package com.chuantou.yuba.api.to;

import java.util.ArrayList;
import java.util.List;

import android.os.Parcel;

import com.google.gson.annotations.SerializedName;

/**
 * 收藏资讯列表TO
 * 
 * @author Administrator
 * 
 */
public class FavNewsListTO extends BaseTO {
	// 当前页码
	@SerializedName("p")
	private int currentPage;
	// 资讯列表
	@SerializedName("list")
	private List<NewsTO> newsList;

	public FavNewsListTO() {
	}

	public FavNewsListTO(Parcel source) {
		super(source);
		this.currentPage = source.readInt();
		this.newsList = new ArrayList<NewsTO>();
		source.readTypedList(this.newsList, NewsTO.CREATOR);
	}

	@Override
	public void writeToParcel(Parcel dest, int flags) {
		super.writeToParcel(dest, flags);
		dest.writeInt(currentPage);
		dest.writeTypedList(this.newsList);
	}

	public static final Creator<FavNewsListTO> CREATOR = new Creator<FavNewsListTO>() {

		@Override
		public FavNewsListTO[] newArray(int size) {
			return new FavNewsListTO[size];
		}

		@Override
		public FavNewsListTO createFromParcel(Parcel source) {
			return new FavNewsListTO(source);
		}
	};

	public int getCurrentPage() {
		return currentPage;
	}

	public void setCurrentPage(int currentPage) {
		this.currentPage = currentPage;
	}

	public List<NewsTO> getNewsList() {
		return newsList;
	}

	public void setNewsList(List<NewsTO> newsList) {
		this.newsList = newsList;
	}

}
